﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace Pikapika.Models
{
    [MetadataType(typeof(PublisherMetadata))]
    public partial class Publisher { }

    public class PublisherMetadata
    {
        [Required()]
        [StringLength(50)]
        public string Name { get; set; }
    }

    [MetadataType(typeof(NovelMetadata))]
    public partial class Novel { }

    public class NovelMetadata
    {
        [Required]
        [StringLength(100)]
        public string Name { get; set; }

        [Required]
        [DataType(DataType.MultilineText)]
        public string Description { get; set; }

        [Required]
        [Display(Name="Publisher")]
        public int PublisherId { get; set; }

        [Required]
        [StringLength(50)]
        public string Author { get; set; }

        [StringLength(255)]
        [DataType(DataType.ImageUrl)]
        public string ImageUrl { get; set; }

    }

    [MetadataType(typeof(NovelVolumeMetadata))]
    public partial class NovelVolume { }

    public class NovelVolumeMetadata
    {
        [DataType(DataType.MultilineText)]
        public string Description { get; set; }

        [StringLength(255)]
        [DataType(DataType.ImageUrl)]
        public string ImageUrl { get; set; }

        [Required]
        [StringLength(50)]
        public string Name { get; set; }

        [Required]
        [Display(Name = "Novel")]
        public int NovelId { get; set; }

        [Required]
        public int RatingCount { get; set; }

        [Required]
        public int RatingPoints { get; set; }

        [Required]
        public int SortIndex { get; set; }

    }

    [MetadataType(typeof(NovelChapterMetadata))]
    public partial class NovelChapter { }

    public class NovelChapterMetadata
    {
        [Required]
        [DataType(DataType.MultilineText)]
        public string ChapterContent { get; set; }

        [Required]
        [StringLength(50)]
        public string Name { get; set; }

        [Required]
        [Display(Name = "Novel volume")]
        public int NovelVolumeId { get; set; }

        [Required]
        [StringLength(50)]
        public string PostUserName { get; set; }

        [Required]
        public int RatingCount { get; set; }

        [Required]
        public int RatingPoints { get; set; }

        [Required]
        public int SortIndex { get; set; }

    }
}